<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <meta property="qc:admins" content="01676642316411516375" />
        <meta name="keywords" content="fly,layui,前端社区">
        <meta name="description" content="Fly社区是跨设备模块化前端框架layui的官网社区，致力于为web开发提供强劲动力">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>
            <?php echo $title ?> - <?php echo C('STIE_NAME') ?>
        </title>
        <!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_24081_wqs7mbp4zl8wu3di.css"> -->
        <!-- <link rel="stylesheet" href="//res.layui.com/layui/build/css/layui.css?t=1503225931801">
        <link rel="stylesheet" href="//res.layui.com/css/fly/global.css?t=1503225931801"
        charset="utf-8"> -->
        <!-- <link rel="stylesheet" data-href="//res.layui.com/css/fly/stretch.css?t=1503225931801"
        class="fly-style"> -->
        <!-- 从Public目录开始找 -->
        <link rel="stylesheet" href="/yuephp/bbs1n/Public/css/font_24081_wqs7mbp4zl8wu3di.css">
        <link rel="stylesheet" href="/yuephp/bbs1n/Public/layui/css/layui.css">
        <link rel="stylesheet" href="/yuephp/bbs1n/Public/css/global.css">
        <script src="/yuephp/bbs1n/Public/layui/layui.js">
        </script>
        
    </head>
    
    <body>
        <div class="header">
            <div class="main">
                <a class="logo" href="/yuephp/bbs1n" title="Fly">
                    Fly社区
                </a>
                <div class="nav">
                    <a href="/jie/">
                        <i class="iconfont icon-wenda">
                        </i>
                        讨论
                    </a>
                    <a href="/case/2017/">
                        <i class="iconfont icon-iconmingxinganli" style="top: 2px;">
                        </i>
                        案例
                    </a>
                    <a href="http://www.layui.com/">
                        <i class="iconfont icon-ui">
                        </i>
                        框架
                    </a>
                </div>

            <?php if (isset($_SESSION['id'])) { ?>

                <div class="nav-user">
                    <a class="avatar" href="<?php echo U('home/set/index');?>"><!-- Public/images/168.jpg -->
                        <img src="/yuephp/bbs1n/<?php echo $_SESSION['face'] ?>">
                        <cite>
                            <?php echo $_SESSION['nickname'] ?>
                        </cite>
                    </a>
                    <div class="nav">
                        <a href="<?php echo U('home/set/index');?>">
                            <i class="iconfont icon-shezhi">
                            </i>
                            设置
                        </a>
                        <a href="<?php echo U('home/login/outLogin');?>">
                            <i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;">
                            </i>
                            退了
                        </a>
                    </div>
                </div>

            <?php } else { ?>

                <div class="nav-user">
                    <a class="unlogin" href="/user/login/">
                        <i class="iconfont icon-touxiang">
                        </i>
                    </a>
                    <span>
                        <a href="<?php echo U('home/login/index');?>">
                            登入
                        </a>
                        <a href="<?php echo U('home/reg/index');?>">
                            注册
                        </a>
                    </span>
                    <p class="out-login">
                        <a href="http://fly.layui.com/app/qq" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-qq" title="QQ登入">
                        </a>
                        <a href="http://fly.layui.com/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
                        class="iconfont icon-weibo" title="微博登入">
                        </a>
                    </p>
                </div>

            <?php } ?> 
                

                

            </div>
        </div>

    
<div class="main layui-clear">
    <div class="wrap">
        <div class="content">
            <div class="fly-tab">
                <div class="layui-tab layui-tab-brief">
                <style type="text/css">
                    /*.indexul li{
                        padding: 0px 8px;
                    }*/
                    .indexform{
                        right: 135px;
                    }
                    .indexform input{
                        width: 180px;
                        margin-top:5px; 
                        font-size: 14px;
                    }
                </style>
                    <ul class="layui-tab-title indexul">
                        <li class="layui-this">
                            <a href="/">
                                首页
                            </a>
                        </li>
                        <li>
                            <a href="/jie/">
                                全部帖
                            </a>
                        </li>
                        <li>
                            <a href="/jie/unsolved/">
                                未结帖
                            </a>
                        </li>
                        <li>
                            <a href="/jie/solved/">
                                已采纳
                            </a>
                        </li>
                        <li>
                            <a href="/jie/wonderful/">
                                精华帖
                            </a>
                        </li>
                    </ul>

                </div>
                <form action="<?php echo U('home/jie/so');?>" class="fly-search indexform" target="_blank"><!-- action="http://cn.bing.com/search" -->
                    <!-- <i class="iconfont icon-sousuo">
                    </i> -->
                    <input class="layui-input" autocomplete="off" placeholder="搜索内容 , 回车跳转" type="text" name="q">
                    <!-- <button type="submit">a</button> -->
                </form>
                <i class="layui-icon fly-search">
                    &#xe615;
                </i>
            </div>
            <style type="text/css">
            .soul .soa{
                margin-right: 8px;
                padding: 0px 6px;
                border-radius: 2px;
                border-color: red;
                border:1px solid #5FB878;
                width: 24px;
                background: #fff url() 0 0 no-repeat;
                font-size: 12px;
                text-align: center;
                color: #5FB878;
            }
            </style>
            <ul class="fly-panel fly-list soul">

                <!-- 置顶或精贴 -->
                <?php foreach ($badge as $row) { ?>
                <li>
                    <a href="<?php echo U('home/u/index',array('id'=>$row['uid']));?>" class="fly-avatar">
                        <img src="/yuephp/bbs1n/<?php echo $row['face'] ?>" alt="<?php echo $row['nickname'] ?>">
                    </a>
                    <h2>
                        <a class="layui-badge soa">
                            <?php echo $row['cname'] ?>
                        </a>
                        <a href="<?php echo U('home/jie/index',array('id'=>$row['id']));?>">
                            <?php echo $row['title'] ?>
                        </a>
                        
                        <?php if (in_array('1',explode(',', $row['badge']))) { ?>
                            <span class="fly-badge fly-badge-stick">
                                置顶
                            </span>
                        <?php } ?>

                        <?php if (in_array('2',explode(',', $row['badge']))) { ?>
                            <span class="fly-badge fly-badge-good">
                            精帖
                            </span>
                        <?php } ?>
                        
                    </h2>
                    <div class="fly-list-info">
                        <a href="<?php echo U('home/u/index',array('id'=>$row['uid']));?>" user>
                            <cite>
                                <?php echo $row['nickname'] ?>
                            </cite>
                            <i class="iconfont icon-renzheng" title="认证信息：layui作者">
                            </i>
                        </a>
                        <span>
                            <?php echo CT($row['create_time']) ?>
                        </span>
                        <!-- <span>
                            <?php echo $row['cname'] ?>
                        </span> -->
                        <span class="fly-list-kiss" title="悬赏飞吻" style='color:#FF7200'><i class="iconfont icon-kiss">&#xe618;</i> <?php echo $row['kiss_num'] ?></span>
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答">
                            </i>
                            <?php echo $row['answer_num'] ?>
                            <i class="iconfont icon-liulanyanjing" title="人气">
                            </i>
                            <?php echo $row['view_num'] ?>
                        </span>
                    </div>
                </li>
                <?php } ?>

            </ul>
            <ul class="fly-panel fly-list soul">
            
                <!-- 普通帖子 -->
                <?php foreach ($ordinary as $row) { ?>
                <li>

                    <a href="<?php echo U('home/u/index',array('id'=>$row['uid']));?>" class="fly-avatar">
                        <img src="/yuephp/bbs1n/<?php echo $row['face'] ?>"
                        alt="<?php echo $row['nickname'] ?>">
                    </a>
                    <h2>
                        <a class="layui-badge soa">
                            <?php echo $row['cname'] ?>
                        </a>
                        <a href="<?php echo U('home/jie/index',array('id'=>$row['id']));?>">
                            <?php echo $row['title'] ?>
                        </a>
                    </h2>
                    <div class="fly-list-info">
                        <a href="<?php echo U('home/u/index',array('id'=>$row['uid']));?>" user>
                            <cite>
                                <?php echo $row['nickname'] ?>
                            </cite>

                            <!-- 此处为VIP功能未处理 -->
                            <?php if ($row['uid']=='4' || $row['uid']=='10' || $row['uid']=='18') { ?>
                            <i class="fly-badge fly-badge-vip">
                                VIP2
                            </i>
                            <?php } ?>

                        </a>
                        <span>
                            <?php echo CT($row['create_time']) ?>
                        </span>
                        <!-- <span>
                            <?php echo $row['cname'] ?>
                        </span> -->
                        <span class="fly-list-kiss" title="悬赏飞吻" style='color:#FF7200'><i class="iconfont icon-kiss">&#xe618;</i> <?php echo $row['kiss_num'] ?></span>
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答">
                            </i>
                            <?php echo $row['answer_num'] ?>
                            <i class="iconfont icon-liulanyanjing" title="人气">
                            </i>
                            <?php echo $row['view_num'] ?>
                        </span>
                    </div>
                </li>
                <?php } ?>

            </ul>
            <div style="text-align: center">
            
                <div class="laypage-main">
                    <a href="/yuephp/bbs1n/index.php/home/index/index/limit/<?php echo $pageLimit ?>/page/2.html" class="laypage-next">
                        更多求解
                    </a>
                </div>
                
                <!-- 分页div -->
                <style type="text/css">
                    #test1 a{
                        margin: 2px;
                        border-color: #009688;
                        background: #E2E2E2 url() 0 0 no-repeat;
                    }
                    #test1 span{
                        margin: 2px;
                        border-color: #009688;
                        background: #E2E2E2 url() 0 0 no-repeat;
                    }
                </style>
                <div id="test1" countNum="<?php echo $Qcounts ?>" limitNum="<?php echo $pageLimit ?>"></div>

            </div>
        </div>
    </div>
    <div class="edge">
        <div class="jie-add">
            <a href="<?php echo U('home/jie/add');?>" class="layui-btn layui-btn-big">
                发表新帖
            </a>
            <a href="javascript:layer.msg('尚未开放');" class="layui-btn layui-btn-big layui-btn-normal"
            style="margin-left: 10px;">
                共享组件
            </a>
        </div>
        <div class="fly-panel leifeng-rank">
            <h3 class="fly-panel-title">
                回贴月榜
            </h3>
            <dl>
            <?php foreach ($TopAnswerUser as $row) { ?>
                <dd>
                    <a href="<?php echo U('home/u/index',array('id'=>$row[id]));?>">
                        <img src="/yuephp/bbs1n/<?php echo $row['face'] ?>">
                        <cite>
                            <?php echo $row['nickname'] ?>
                        </cite>
                        <i>
                            <?php echo $row['answer_num'] ?>次回答
                        </i>
                    </a>
                </dd>
            <?php } ?>
            </dl>
        </div>
        <div class="fly-panel">
            <h3 class="fly-panel-title">
                温馨通道
            </h3>
            <ul class="fly-notice">
                <li>          
                    <a href="http://fly.layui.com/jie/14433/" target="_blank">
                                赢取飞吻，可成为 “layui 高级应用者”          
                    </a>        
                </li>
                <li>          
                    <a href="http://fly.layui.com/jie/13435/" target="_blank">
                                关于社区飞吻的消耗与增加          
                    </a>        
                </li>
                <li>
                    <a href="http://fly.layui.com/jie/5366/" target="_blank">
                        layui 1.x 版本常见问题的处理和实用干货集锦
                    </a>
                </li>
                <li>
                    <a href="https://fly.layui.com/jie/4281/" target="_blank">
                        layui 的 GitHub 及 开源中国码云 仓库地址
                    </a>
                </li>
                <li>
                    <a href="http://fly.layui.com/jie/8157/" target="_blank">
                        下载“Fly社区”页面模板：Fly Template v2.0
                    </a>
                </li>
                <li>
                    <a href="http://layim.layui.com/?from=fly" target="_blank">
                        欢迎提供情怀赞助，促进 layui 系列良性发展
                    </a>
                </li>
            </ul>
        </div>
        <div class="fly-panel" style="text-align: center;">
            <a href="http://layim.layui.com/?from=fly" target="_blank">
                <img src="/yuephp/bbs1n/Public/images/168_1500291753257_18702.jpg" style="width: 336px; height: 166px;"
                alt="layim下载">
            </a>
        </div>
        <dl class="fly-panel fly-list-one">
            <dt class="fly-panel-title">
                近期热议
            </dt>
            <!-- <dd>
                <a href="/jie/12677/">
                    layui 2.0 已正式更新到官网，周一将面向全网开放下载
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    84
                </span>
            </dd> -->
            <?php foreach ($hotAnswer as $row) { ?>
            <dd>
                <a href="<?php echo U('home/jie/index',array('id'=>$row['id']));?>">
                    <?php echo $row['title'] ?>
                </a>
                <span>
                    <i class="iconfont">
                        
                    </i>
                    <?php echo $row['answer_num'] ?>
                </span>
            </dd>
            <?php } ?>
            <!-- <dd>
                <a href="/jie/12528/">
                    layui 官网累计下载量突破 200000
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    77
                </span>
            </dd>
            <dd>
                <a href="/jie/12526/">
                    （已结束）LayIM 3.x 标准版盛情巨惠，以最低门槛 加入 LayIM 会员群
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    58
                </span>
            </dd>
            <dd>
                <a href="/jie/12531/">
                    很好奇社区里使用layui的程序员里面是前端的多还是后端的多
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    28
                </span>
            </dd>
            <dd>
                <a href="/jie/12623/">
                    如果不能实现,请不要轻易允诺
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    27
                </span>
            </dd>
            <dd>
                <a href="/jie/12482/">
                    建议LayUI永久免费，不要发布收费版本
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    16
                </span>
            </dd>
            <dd>
                <a href="/jie/12518/">
                    字体图标是不是有点少了
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    16
                </span>
            </dd>
            <dd>
                <a href="/jie/12522/">
                    按照社区的模版用了一周时间，仿照了个系统，献丑了，晒晒哈
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    14
                </span>
            </dd>
            <dd>
                <a href="/jie/12695/">
                    看完layui2.0 ，站长确实是一个JS大婶
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    14
                </span>
            </dd>
            <dd>
                <a href="/jie/12510/">
                    关于动态TABLE
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    12
                </span>
            </dd>
            <dd>
                <a href="/jie/12492/">
                    贤心你好，请教几个技术问题？
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    11
                </span>
            </dd>
            <dd>
                <a href="/jie/12591/">
                    心姐，layui2.0有这个功能吗？
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    11
                </span>
            </dd>
            <dd>
                <a href="/jie/12706/">
                    如果用2.0的版本直接覆盖掉1.x的js和css会有什么后果
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    10
                </span>
            </dd>
            <dd>
                <a href="/jie/12603/">
                    我下载了layui，表单的部分内容没有显示
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    10
                </span>
            </dd>
            <dd>
                <a href="/jie/12551/">
                    名字后面带个 VIP 感觉就是不一样
                </a>
                <span>
                    <i class="iconfont">
                        &#xe60c;
                    </i>
                    9
                </span>
            </dd> -->
        </dl>
        <div class="fly-panel" style="padding: 20px 0; text-align: center;">
            <img src="/yuephp/bbs1n/Public/images/168_1501894831075_19619.jpg" style="max-width: 100%;"
            alt="layui">
            <p style="position: relative; top: 10px; color: #666;">
                微信扫码关注 layui 公众号
            </p>
        </div>
        <div class="fly-panel fly-link">
            <h3 class="fly-panel-title">
                友情链接
            </h3>
            <dl>
                <dd>
                    <a href="http://layim.layui.com/" target="_blank">
                        WebIM
                    </a>
                    <dd>
                        <dd>
                            <a href="http://layer.layui.com/" target="_blank">
                                layer
                            </a>
                            <dd>
                                <dd>
                                    <a href="http://www.bejson.com/" target="_blank">
                                        JSON在线工具
                                    </a>
                                    <dd>
                                        <dd>
                                            <a href="http://www.smeoa.com/" target="_blank">
                                                小微OA
                                            </a>
                                            <dd>
                                                <dd>
                                                    <a href="http://www.fineui.com/" target="_blank">
                                                        FineUI开源控件
                                                    </a>
                                                    <dd>
            </dl>
        </div>
    </div>
</div>

<script>
layui.use(['laypage','jquery'], function(){
  var laypage = layui.laypage;
  $ = layui.jquery;

  counts = $('#test1').attr('countNum'); //数据总数
  pLimit = $('#test1').attr('limitNum'); //每页显示条数
  //执行一个laypage实例
  laypage.render({
    elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
    ,count: counts //数据总数，从服务端得到
    ,limit: pLimit //默认值 10
    ,first:'首页'
    ,last:'尾页'
    ,curr: <?php if (empty($_GET['page'])) { ?>
        <?php echo 2 ?>
    <?php }else{ ?>
        <?php echo $_GET['page'] ?>
    <?php } ?>
    //,curr:location.hash.replace('page', '') //获取起始页
  //,hash: 'page/' //自定义hash值
          ,jump: function(obj, first){
        //obj包含了当前分页的所有参数，比如：
        console.log(obj.curr);  //得到当前页，以便向服务端请求对应页的数据。
        console.log(obj.limit); //得到每页显示的条数
        console.log(obj.first);
        pageCurr = obj.curr;
        pageLimit = obj.limit;

        //首次不执行
        if(!first){
          //do something
                $.ajax({
                    url: '<?php echo U('home/index/ajaxPage');?>',
                    type: 'POST',
                    dataType: 'json',
                    data: {pageCurr: pageCurr,pageLimit:pageLimit},
                })
                .done(function(res) {
                    console.log("success");
                    curr = res.curr;
                    limit = res.limit;
                    location.replace('/yuephp/bbs1n/index.php/home/index/index/page/'+curr+'.html');
                    //location.hash.replace('page/', curr);
                })
                .fail(function() {
                    console.log("error");
                })    
            }
        }
  });
});
</script>

        <div class="footer">
            <p>
                <a href="http://fly.layui.com/">
                    Fly社区
                </a>
                2017 &copy;
                <a href="http://www.layui.com/">
                    layui.com
                </a>
            </p>
            <p>
                <a href="http://fly.layui.com/jie/3147.html" target="_blank">
                    产品授权
                </a>
                <a href="http://fly.layui.com/jie/8157.html" target="_blank">
                    获取Fly社区模版
                </a>
                <a href="http://fly.layui.com/jie/2461.html" target="_blank">
                    微信公众号
                </a>
            </p>
        </div>
        <!--<script src="//res.layui.com/layui/build/layui.js?t=1503225931801">
        </script>!-->
        <!--<script>
            layui.cache.page = 'index';
            layui.cache.user = {
                username: '游客',
                uid: -1,
                avatar: 'http://res.layui.com/images/fly/avatar/00.jpg',
                experience: 0,
                sum: 0,
                vip: 0,
                sex: ''
            };
            layui.config({
                version: "1503225931801"
            }).extend({
                'fly': '//res.layui.com/lay/modules/fly/index'
            }).use('fly');
        </script>
        <script type="text/javascript">
            var cnzz_protocol = (("https:" == document.location.protocol) ? " https://": " http://");
            document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));
        </script>!-->
    </body>

</html>


<!-- // return array(
//     //'配置项'=>'配置值'
//     'LAYOUT_ON'=>true,
//     'LAYOUT_NAME'=>'moban',
//     'STIE_NAME'=>'Lin-社区',  //设置title的名字
//     'AUTH_PATHS'=>array(
//         'Home/Set/index',
//         'Home/Jie/add',
//         ),
// ); -->